import React from 'react'
import SearchHeader from "../../components/SearchHeader/index";
import SearchList from "./subpage/List";

class Search extends React.Component {
  constructor(props, context) {
    super(props, context);
    console.log(this.props.match.params)
  }
  render(){
    return (
      <div>
        <SearchHeader keyword={this.props.match.params.keyword}/>
        <SearchList keyword={this.props.match.params.keyword} category={this.props.match.params.category}/>
      </div>
    );
  }

  componentDidMount(){
    const params = this.props.match.params;
    console.log('category param: ' + params.category);
    console.log('key param: ' + params.keyword)
  }
}

export default Search;